package org.example.xmut.qa.service.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.example.xmut.qa.service.domain.port.GetQaListPort;
import org.example.xmut.qa.service.domain.valueobject.Answer;
import org.example.xmut.qa.service.domain.valueobject.QaId;
import org.example.xmut.qa.service.domain.valueobject.Question;

import java.util.List;

@Slf4j
@Setter
@Getter
@ToString
public class Qa {
    private QaId id;
    private Question question;
    private Answer answer;

    public Qa(QaId qaId, Question question, Answer answer) {
        this.id = qaId;
        this.question=question;
        this.answer=answer;
    }

    public Qa(Question question, Question question1, Answer answer) {
        this.question=question;
        this.answer=answer;
    }

    public Qa() {

    }

    public static List<Qa> getQas(GetQaListPort getQaListPort) {
        return getQaListPort.getQas();
    }
}
